package com.qd.upload.config;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @author sjk
 */
@Data
@Accessors(chain = true)
public class FileConfirmReq {


    private List<String> files;
    private Info info;

    public void freeData() {
        files.clear();
        info.freeData();
    }

    @Data
    @Accessors(chain = true)
    public static final class Info {
        /**
         * 附件类型
         */
        private String attachmentType;
        @JsonProperty("typeKey")
        private String typeKey;
        @JsonProperty("bKey")
        private String bKey;
        @JsonProperty("isAutoTypeKey")
        private boolean isAutoTypeKey = false;

        public void freeData() {
            this.attachmentType = null;
            this.typeKey = null;
            this.bKey = null;
        }
    }
}

